import http from './request';
import { ICommentParmas } from '../pages/comment/types';


export function fetchCommentTableData(params: ICommentParmas) {

  return http({
    url: '/articles', params,
    method: "get"
  })
}
export function fetchCommentChangeStatus(id: number, params: { allow_comment: boolean }) {
  // allow_comment: true
  return http.put(`comments/status?article_id=${id}`, params)
}

// articles?page=1&per_page=10&response_type=comment
// page: 1
// per_page: 10
// response_type: comment